package net.wsfcp.android.base;


import android.app.Application;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;

import net.wsfcp.android.greendao.DaoManager;
import net.wsfcp.android.greendao.gen.DaoMaster;
import net.wsfcp.android.greendao.gen.DaoSession;
import net.wsfcp.android.utils.CommonValue;

import org.greenrobot.greendao.database.Database;

/**
 * Created by Shaoboyang on 2018/12/14.
 * 应用,主要用来做一下初始化的操作
 */
//基类application
public class BaseApplication extends Application {
    private static Context mContext;
    private static DaoSession daoSession;


    @Override
    public void onCreate() {
        super.onCreate();
        mContext = this;

        //初始化greendao
        DaoManager.getInstance().getDaoSession();
    }

    /**
     * @return 全局的上下文
     */
    public static Context getContext() {
        return mContext;
    }


}
